/*
 * Camera.h
 *
 *  Created on: 15 Dec 2010
 *      Author: Mohab
 */

#include <math.h>

#define PI 3.14159265358979323846

class Vector3
{
	public:
		float x, y, z;

		Vector3();
		Vector3(float xCoord, float yCoord, float zCoord);

		void operator +=(Vector3& v)
		{
			x += v.x;
			y += v.y;
			z += v.z;
		}
		friend Vector3 operator +(const Vector3& v1, const Vector3& v2)
		{
			return Vector3(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z);
		}
		void operator -=(Vector3& v)
		{
			x -= v.x;
			y -= v.y;
			z -= v.z;
		}
		friend Vector3 operator -(const Vector3& v1, const Vector3& v2)
		{
			return Vector3(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z);
		}
};

class Camera
{
	public:
		Vector3 Position;
		Vector3 Rotation;
		Vector3 Forward;
		Vector3 Left;
		Vector3 Right;
		Vector3 Target;

		Camera();
		void Update();
};
